<?php 
/**
 *   Joomdiet - components/views/activityitem/tmpl/default.php
 *   Author: Juan Dapena Paz (juan@bittingbits.com)
 *   Copyright (C) 2010 Bitting Bits S.L.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
defined('_JEXEC') or die('Restricted access'); ?>
<?php
    $hours = JRequest::getVar('physicalactivity_time_hours'.$this->physicalactivity->id);
    $mins = JRequest::getVar('physicalactivity_time_hours'.$this->physicalactivity->id);
    if (!$hours) $hours = 0;
    if (!$mins) $mins = 0;
?>
<tr>
    <td min-width="100px"><b><?php echo $this->physicalactivity->name; ?></b></td>
    <td>
        <input type="text" class="hours_field" name="physicalactivity_time_hours<?php echo $this->physicalactivity->id; ?>" id="physicalactivity_time_hours<?php echo $this->physicalactivity->id; ?>" size="5" value="<?php echo $hours; ?>" />
        <?php echo JText::_('COM_JOOMDIET_HOURS'); ?> : 
        <input type="text" class="mins_field" name="physicalactivity_time_mins<?php echo $this->physicalactivity->id; ?>" id="physicalactivity_time_mins<?php echo $this->physicalactivity->id; ?>" size="5" value="<?php echo $mins; ?>" />
        <?php echo JText::_('COM_JOOMDIET_MINS'); ?>
    </td>
    <td>
        <div id="calculateditem<?php echo $this->physicalactivity->id; ?>">
            <?php echo $this->physicalactivity->energy; ?>
        </div>
        <input type="hidden" class="energy_fields" id="energy<?php echo $this->physicalactivity->id; ?>" value="<?php echo $this->physicalactivity->energy; ?>" />
    </td>
</tr>
